﻿
namespace Budgetsch.Web.EntityModel
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Data.Objects.DataClasses;
    using System.Linq;
    using System.ServiceModel.DomainServices.Hosting;
    using System.ServiceModel.DomainServices.Server;


    // The MetadataTypeAttribute identifies CostMetadata as the class
    // that carries additional metadata for the Cost class.
    [MetadataTypeAttribute(typeof(Cost.CostMetadata))]
    public partial class Cost
    {

        // This class allows you to attach custom attributes to properties
        // of the Cost class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class CostMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private CostMetadata()
            {
            }

            public decimal Amount { get; set; }

            public int CategoryID { get; set; }

            public string Comment { get; set; }
            [Include]
            public CostCategory CostCategory { get; set; }

            public EntityCollection<CostComment> CostComments { get; set; }

            public Nullable<int> Delta { get; set; }

            public string Description { get; set; }

            public Nullable<DateTime> EndDate { get; set; }

            public int ID { get; set; }

            public bool IsRecurring { get; set; }

            public DateTime StartDate { get; set; }

            public User User { get; set; }

            public int UserID { get; set; }

            public bool ViaCreditCard { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies CostCategoryMetadata as the class
    // that carries additional metadata for the CostCategory class.
    [MetadataTypeAttribute(typeof(CostCategory.CostCategoryMetadata))]
    public partial class CostCategory
    {

        // This class allows you to attach custom attributes to properties
        // of the CostCategory class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class CostCategoryMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private CostCategoryMetadata()
            {
            }

            public EntityCollection<Cost> Costs { get; set; }

            public int ID { get; set; }

            public string Name { get; set; }

            public User User { get; set; }

            public int UserID { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies CostCommentMetadata as the class
    // that carries additional metadata for the CostComment class.
    [MetadataTypeAttribute(typeof(CostComment.CostCommentMetadata))]
    public partial class CostComment
    {

        // This class allows you to attach custom attributes to properties
        // of the CostComment class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class CostCommentMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private CostCommentMetadata()
            {
            }

            public string Comment { get; set; }
            [Include]
            public Cost Cost { get; set; }

            public int CostID { get; set; }

            public int ID { get; set; }
            [Include]
            public User User { get; set; }

            public int UserID { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies CurrencyMetadata as the class
    // that carries additional metadata for the Currency class.
    [MetadataTypeAttribute(typeof(Currency.CurrencyMetadata))]
    public partial class Currency
    {

        // This class allows you to attach custom attributes to properties
        // of the Currency class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class CurrencyMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private CurrencyMetadata()
            {
            }

            public int ID { get; set; }

            public string ShortName { get; set; }

            public string Symbol { get; set; }

            public EntityCollection<User> Users { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies IncomeMetadata as the class
    // that carries additional metadata for the Income class.
    [MetadataTypeAttribute(typeof(Income.IncomeMetadata))]
    public partial class Income
    {

        // This class allows you to attach custom attributes to properties
        // of the Income class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class IncomeMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private IncomeMetadata()
            {
            }

            public decimal Amount { get; set; }

            public int CategoryID { get; set; }

            public string Comment { get; set; }

            public Nullable<int> Delta { get; set; }

            public string Description { get; set; }

            public Nullable<DateTime> EndDate { get; set; }

            public int ID { get; set; }

            [Include]
            public IncomeCategory IncomeCategory { get; set; }

            public EntityCollection<IncomeComment> IncomeComments { get; set; }

            public bool IsRecurring { get; set; }

            public DateTime StartDate { get; set; }

            public User User { get; set; }

            public int UserID { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies IncomeCategoryMetadata as the class
    // that carries additional metadata for the IncomeCategory class.
    [MetadataTypeAttribute(typeof(IncomeCategory.IncomeCategoryMetadata))]
    public partial class IncomeCategory
    {

        // This class allows you to attach custom attributes to properties
        // of the IncomeCategory class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class IncomeCategoryMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private IncomeCategoryMetadata()
            {
            }

            public int ID { get; set; }

            [Include]
            public EntityCollection<Income> Incomes { get; set; }

            public string Name { get; set; }

            public User User { get; set; }

            public int UserID { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies IncomeCommentMetadata as the class
    // that carries additional metadata for the IncomeComment class.
    [MetadataTypeAttribute(typeof(IncomeComment.IncomeCommentMetadata))]
    public partial class IncomeComment
    {

        // This class allows you to attach custom attributes to properties
        // of the IncomeComment class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class IncomeCommentMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private IncomeCommentMetadata()
            {
            }

            public string Comment { get; set; }

            public int ID { get; set; }

            [Include]
            public Income Income { get; set; }

            public int IncomeID { get; set; }

            [Include]
            public User User { get; set; }

            public int UserID { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies SavingMetadata as the class
    // that carries additional metadata for the Saving class.
    [MetadataTypeAttribute(typeof(Saving.SavingMetadata))]
    public partial class Saving
    {

        // This class allows you to attach custom attributes to properties
        // of the Saving class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class SavingMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private SavingMetadata()
            {
            }

            public decimal Amount { get; set; }

            public int CategoryID { get; set; }

            public string Comment { get; set; }

            public DateTime Date { get; set; }

            public int ID { get; set; }
            [Include]
            public SavingCategory SavingCategory { get; set; }

            public EntityCollection<SavingComment> SavingComments { get; set; }

            
            public User User { get; set; }

            public int UserID { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies SavingCategoryMetadata as the class
    // that carries additional metadata for the SavingCategory class.
    [MetadataTypeAttribute(typeof(SavingCategory.SavingCategoryMetadata))]
    public partial class SavingCategory
    {

        // This class allows you to attach custom attributes to properties
        // of the SavingCategory class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class SavingCategoryMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private SavingCategoryMetadata()
            {
            }

            public int ID { get; set; }

            public string Name { get; set; }

            [Include]
            public EntityCollection<Saving> Savings { get; set; }

            public User User { get; set; }

            public int UserID { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies SavingCommentMetadata as the class
    // that carries additional metadata for the SavingComment class.
    [MetadataTypeAttribute(typeof(SavingComment.SavingCommentMetadata))]
    public partial class SavingComment
    {

        // This class allows you to attach custom attributes to properties
        // of the SavingComment class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class SavingCommentMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private SavingCommentMetadata()
            {
            }

            public string Comment { get; set; }

            public int ID { get; set; }
            [Include]
            public Saving Saving { get; set; }

            public int SavingID { get; set; }

            [Include]
            public User User { get; set; }

            public int UserID { get; set; }
        }
    }

    // The MetadataTypeAttribute identifies UserMetadata as the class
    // that carries additional metadata for the User class.
    [MetadataTypeAttribute(typeof(User.UserMetadata))]
    public partial class User
    {

        // This class allows you to attach custom attributes to properties
        // of the User class.
        //
        // For example, the following marks the Xyz property as a
        // required property and specifies the format for valid values:
        //    [Required]
        //    [RegularExpression("[A-Z][A-Za-z0-9]*")]
        //    [StringLength(32)]
        //    public string Xyz { get; set; }
        internal sealed class UserMetadata
        {

            // Metadata classes are not meant to be instantiated.
            private UserMetadata()
            {
            }

            public EntityCollection<CostCategory> CostCategories { get; set; }

            public EntityCollection<CostComment> CostComments { get; set; }

            public EntityCollection<Cost> Costs { get; set; }

            public Currency Currency { get; set; }

            public int CurrencyID { get; set; }

            public int ID { get; set; }

            public EntityCollection<IncomeCategory> IncomeCategories { get; set; }

            public EntityCollection<IncomeComment> IncomeComments { get; set; }

            public EntityCollection<Income> Incomes { get; set; }

            public bool IsSharing { get; set; }

            public EntityCollection<SavingCategory> SavingCategories { get; set; }

            public EntityCollection<SavingComment> SavingComments { get; set; }

            public EntityCollection<Saving> Savings { get; set; }

            public string UserName { get; set; }
        }
    }
}
